package com.hy.admin.dao;

import com.hy.admin.entity.QuestionClickEntity;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface QuestionClickDao {
    int deleteByPrimaryKey(Long id);

    int insert(QuestionClickEntity record);

    int insertSelective(QuestionClickEntity record);

    QuestionClickEntity selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(QuestionClickEntity record);

    int updateByPrimaryKey(QuestionClickEntity record);

    /**
     * 查询用户是否查看过答案(0-未查看，1-已查看)
     * @param questionId
     * @param memberId
     * @return
     */
    int selectCountByQIdAndMId(@Param("questionId") Long questionId, @Param("memberId") Long memberId);
}